﻿<%@ WebHandler Language="C#" Class="SysUser_GetByPage" %>

using System;
using System.Web;
using System.Text;
using Newtonsoft.Json;
public class SysUser_GetByPage : IHttpHandler , System.Web.SessionState.IReadOnlySessionState
{
    
    public void ProcessRequest (HttpContext context) 
    {
        OTS.Common.PageSuccess page = new OTS.Common.PageSuccess();
        if (!OTS.BaseLogin.validataModule(context, (int)OTS.enumSysRight.SalesOrderManager))
        {
            page.success = false;
            page.msg = "非法操作！";
        }
        else
        {
            string id = context.Request["order.orderId"];
            string expressNO = context.Request["order.expressNO"];
            string expressName = context.Request["order.expressName"];
            if (null != id && !"".Equals(id) && null != expressName && !"".Equals(expressName) && null != expressNO && !"".Equals(expressNO))
            {
                string strExpressID = OTS.Common.Help.GetExpressIDbyName(expressName);
                OTS.BLL.SaleOrderBLL bll = new OTS.BLL.SaleOrderBLL();
                if (bll.UpdateExpressInfo(id, strExpressID, expressNO))
                {
                    page.success = true;
                    page.msg = "更新成功！";
                }
                else
                {
                    page.success = true;
                    page.msg = "更新失败！";
                }
            }
            else
            { 
                page.success = false;
                page.msg = "非法操作！";
            }


        } 
        context.Response.ContentType = "application/x-json";
        context.Response.Charset = "utf-8";
        context.Response.Write(JavaScriptConvert.SerializeObject(page));
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}